package com.lanxiao.cloud.modules.oauth.application.dto;

import com.lanxiao.cloud.common.core.dto.BaseTreeDto;
import com.lanxiao.cloud.common.core.enums.MethodEnum;
import com.lanxiao.cloud.common.core.enums.StateEnum;
import com.lanxiao.cloud.modules.oauth.infrastructure.enums.ButtonEventEnum;
import com.lanxiao.cloud.modules.oauth.infrastructure.enums.PositionEnum;
import com.lanxiao.cloud.modules.oauth.infrastructure.enums.TypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;

/**
 * @author ：qiaoliang
 * @date ：2021-09-15
 */
@ApiModel("权限树形结构返回模型")
public class PermissionTreeDto extends BaseTreeDto<Long> {

  @ApiModelProperty(value = "名称")
  private final String title;
  @ApiModelProperty(value = "标识")
  private final String mark;
  @ApiModelProperty(value = "类型")
  private final TypeEnum type;
  @ApiModelProperty(value = "请求url")
  private final String url;
  @ApiModelProperty(value = "请求类型")
  private final MethodEnum method;
  @ApiModelProperty(value = "按钮位置")
  private final PositionEnum position;
  @ApiModelProperty(value = "事件类型")
  private final ButtonEventEnum eventType;
  @ApiModelProperty(value = "事件")
  private final String event;
  @ApiModelProperty(value = "排序")
  private final int sort;
  @ApiModelProperty(value = "状态")
  private final StateEnum state;
  @ApiModelProperty(value = "图标")
  private final String icon;
  @ApiModelProperty(value = "路由地址")
  private final String path;
  @ApiModelProperty(value = "路由路径")
  private final String component;
  @ApiModelProperty(value = "路由名称")
  private final String name;
  @ApiModelProperty(value = "重定向地址")
  private final String redirect;

  public PermissionTreeDto(Long id, Long parentId, Date createTime, Date updateTime,
      String remark, String title, String mark,
      TypeEnum type, String url, MethodEnum method,
      PositionEnum position,
      ButtonEventEnum eventType,
      String event, int sort,
      StateEnum state, String icon, String path, String component, String name,
      String redirect) {
    super(id, parentId, createTime, updateTime, remark);
    this.title = title;
    this.mark = mark;
    this.type = type;
    this.url = url;
    this.method = method;
    this.position = position;
    this.eventType = eventType;
    this.event = event;
    this.sort = sort;
    this.state = state;
    this.icon = icon;
    this.path = path;
    this.component = component;
    this.name = name;
    this.redirect = redirect;
  }

  public String getTitle() {
    return title;
  }

  public String getMark() {
    return mark;
  }

  public TypeEnum getType() {
    return type;
  }

  public String getUrl() {
    return url;
  }

  public MethodEnum getMethod() {
    return method;
  }

  public PositionEnum getPosition() {
    return position;
  }

  public ButtonEventEnum getEventType() {
    return eventType;
  }

  public String getEvent() {
    return event;
  }

  public int getSort() {
    return sort;
  }

  public StateEnum getState() {
    return state;
  }

  public String getIcon() {
    return icon;
  }

  public String getPath() {
    return path;
  }

  public String getComponent() {
    return component;
  }

  public String getName() {
    return name;
  }

  public String getRedirect() {
    return redirect;
  }
}
